<template>
  <el-upload class="upload-demo" drag v-if="obj.drag" :multiple="obj.multiple" :action="obj.action">
    <el-icon class="el-icon--upload">
      <component :is="el - icon - upload"></component>
    </el-icon>
    <div class="el-upload__text">
      {{ obj.upload_text }}
    </div>
  </el-upload>
  <el-upload v-else class="upload-demo" :multiple="obj.multiple" :action="obj.action">
    <el-button :color="obj.color" type="primary">{{ obj.button }}</el-button>
  </el-upload>
</template>

<script>
export default {
  name: 'uploadView',
  props: {
    obj: Object
  }
}
</script>

<style scoped></style>
